<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
    <meta name="format-detection" content="telephone=no, email=no"/>
    <meta name="apple-mobile-web-app-capable" content="yes"/>
    <meta name="apple-mobile-web-app-status-bar-style" content="black"/>
    <title>Title</title>
</head>
<body>
</body>
<script>

    function obj(name, leave) {
        var obj1 = new Object();
        obj1.name = name;
        obj1.leave = leave;
        obj1.a = function () {
            alert("这是一辆" + this.name + ",合格证:" + this.leave + ",建议零售价1000万元" + "建议定时保养,来保持车的质量与车龄。")
        };
        return obj1;
    }

    var car = obj("法拉利", "法拉利公司出厂");
    car.a()

</script>
</html>